package com.example.certificate.utils;

import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

@Data
@JsonInclude(JsonInclude.Include.NON_NULL)
public class CodeEntity {

    @ApiModelProperty("手机号")
    private String mobile;

    @ApiModelProperty("验证码")
    private Integer code;

    private Integer status;

    public int getCode(){
        return code;
    }

    public void setCode(){
      code = (int)((Math.random()*9+1)*1000);  //每次调用生成一次四位数的随机数
    }
}
